define(function(require){
	var $ = require("jquery");
	var justep = require("$UI/system/lib/justep");

	var Model = function(){
		this.callParent();
	};

	Model.prototype.modelParamsReceive = function(event){

	 var data = this.comp("harvestData");
	 if(this.params.operator=='new'){
	 data.newData({
		"defaultValues" : [ {
			"fPhone" : localStorage.getItem('LoginState'),
			"fCommon" : 0,
			"fCreateTime" : new Date()
		} ]
	})
	 }
		else{
		data.loadData([this.params.rowdata]);
		data.first();
		}
	};

	Model.prototype.WanChengButtonClick = function(event){
	this.owner.send(this.comp("harvestData"));
	this.close();
	};

	return Model;
});